3Peak x 10Lines
---------------
Written by Brataccas

3Peak x 10Lines is a variation of the classic Touch Master 3 Peak Deluxe (AKA Tri-Peaks) solitaire card game for the C64, written in 10 BASIC lines.

Use a joystick in Port 2.

When the game opens, 18 cards are dealt face down in a tri-pyramid arrangement.  9 cards appear face up on the last row.  The remainder of the deck is spread out at the bottom of the screen, with a single draw card visible at the rightmost side.

Use the joystick to move the selection cursor over any card in the pyramids.  Press the fire button to perform one of two actions based on the highlighted card:
 
Swap cards: If the face value of the current card is one higher or one lower than the draw card, the highlighted card is removed from the pyramid and swapped for the draw card.  Aces count as one value higher/lower than both Kings and Twos.

Draw a card: If the face value of the current card differs by more than one from the draw card, or if the cursor is over a face down card or a blank space, a new card is drawn from the deck.

As cards are removed from the lower rows of the pyramid, any face down cards above them that are no longer partially covered are flipped over.

The goal of the game is to remove all cards from all three pyramids.  If the board is cleared, the deck is reshuffled and the game continues to the next round.

The game ends if all the cards in the draw pile are used and the pyramids have not been cleared.
